<link rel="stylesheet" href="<?= $CfgPara->httproot ?>/css/amazeui.datetimepicker.css"/>
<script type="text/javascript" src="<?= $CfgPara->httproot ?>/js/amazeui.datetimepicker.min.js"></script>
<script type="text/javascript" src="<?= $CfgPara->httproot ?>/js/amazeui.datetimepicker.zh-CN.js"></script>
<div id="work_edit_div" class="app-toolbar-content">
    <?php
    $tittleText = '作品信息编辑';
    $tittleBackForward = "controller=work_edit&work_next=0&work_id={$InputData['work_id']}&work_img_names={$workLastStepImgs}";
    require("{$CfgPara->root}/view/tittle_back_act.app.v.php");
    ?>
    <ul class="am-list" style="margin-top:-1px">
        <li id="work_edit_name" class="app-work-content-li">
            <i class="am-icon-pencil"></i>
            <input placeholder="请输入作品标题"
                   style="border:none; width:80%"
                   id="work_value_tittle"
                   value="<?php if (isset($workMsg)) echo $workMsg->Name; ?>"/>
            <i class="am-icon-chevron-right am-fr app-gray-color"></i>
        </li>
        <li id="work_edit_introd" class="app-work-content-li">
            <i class="am-icon-pencil"></i>
            <input placeholder="请输入作品简介"
                   style="border:none; width:80%"
                   id="work_value_introd"
                   value="<?php if (isset($workMsg)) echo $workMsg->Introd; ?>"/>
            <i class="am-icon-chevron-right am-fr app-gray-color"></i>
        </li>
        <li id="work_edit_stype" class="app-work-content-li">
            <i class="am-icon-pencil"></i>
            <input placeholder="请输入作品鞋款"
                   style="border:none; width:80%"
                   id="work_value_stype"
                   value="<?php if (isset($workMsg)) echo $workMsg->SType; ?>"/>
            <i class="am-icon-chevron-right am-fr app-gray-color"></i>
        </li>
        <li id="work_edit_tags" class="app-work-content-li">
            <i class="am-icon-pencil"></i>
            <input placeholder="请输入搜索标签 空格分隔"
                   style="border:none; width:80%"
                   id="work_value_tags"
                   value="<?php if (isset($workMsg)) echo $workMsg->Tags; ?>"/>
            <i class="am-icon-chevron-right am-fr app-gray-color"></i>
        </li>
        <li id="work_edit_type" class="app-work-content-li" data-am-modal="{target: '#prompt_type_edit'}">
            <i class="am-icon-pencil"></i>
            <input placeholder="请选择作品类型"
                   style="border:none; width:80%" readonly
                   id="work_display_type"
                   value="<?php
                   if (isset($workMsg)) {
                       if ($workMsg->Type == 2)
                           echo '自制';
                       else
                           echo '定制';
                   }
                   ?>"/>
            <i class="am-icon-chevron-right am-fr app-gray-color"></i>
        </li>
        <li id="work_edit_releasedt" class="app-work-content-li">
            <i class="am-icon-pencil"></i>
            <input placeholder="请输入创作时间(选填)"
                   style="border:none; width:80%" readonly
                   id="work_value_releasedt"
                   value="<?php if (isset($workMsg)) echo substr($workMsg->ReleaseDt, 0, 16); ?>"/>
            <i class="am-icon-chevron-right am-fr app-gray-color"></i>
        </li>
    </ul>
</div>
<div id="work_edit_toolbar" class="am-btn-group" style="width:100%">
    <a style="width:50%" class="am-btn am-btn-default" role="button" onclick="work_save(0)">存为草稿</a>
    <a style="width:50%" class="am-btn app-main-backcolor" role="button" onclick="work_save(1)">发布</a>
</div>
<div style="display:none">
    <input id="parent_type" name="parent_type" value="1"/>
    <input id="parent_id" name="work_id" type="text"
           value="<?php if (isset($workMsg)) echo $workMsg->Id; else echo '0'; ?>"/>
    <div id="last_step_imgs"><?php if (isset($workLastStepImgs)) echo $workLastStepImgs; ?></div>
</div>
<div class="am-popup" id="popup_type_edit">
    <div class="am-popup-inner" style="background-color:#F8F8F8">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">作品类型</h4>
            <span data-am-modal-close class="am-close">&times;</span>
        </div>
        <div class="am-popup-bd">
            <div class="am-form">
                <div class="am-form-group">
                    <span>请选择作品类型：</span>
                    <select id="work_edit_content_type" style="border: none;">
                        <option value="0" <?php if (!isset($workMsg->Type) || $workMsg->Type == 0) echo 'selected'; ?>>
                            尚未选择
                        </option>
                        <option value="1" <?php if (isset($workMsg->Type) && $workMsg->Type == 1) echo 'selected'; ?>>
                            定制
                        </option>
                        <option value="2" <?php if (isset($workMsg->Type) && $workMsg->Type == 2) echo 'selected'; ?>>
                            自制
                        </option>
                    </select>
                    <button style="margin-top:10px" data-am-modal-close type="button" class="am-btn am-btn-sm am-fr"
                            onclick="reset_editor_value('type')">取消
                    </button>
                    <button style="margin-top:10px" data-am-modal-close type="button"
                            class="am-btn am-btn-primary am-btn-sm am-fr" onclick="set_editor_value('type')">确定
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="am-modal am-modal-prompt" tabindex="-1" id="prompt_type_edit">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">作品类型</div>
        <div class="am-modal-bd">
            <div class="am-form-group">
                <label class="am-radio-inline">
                    <input type="radio"
                           value="1"
                           name="work_value_type"
                        <?php if (!isset($workMsg->Type) || $workMsg->Type == 0 || $workMsg->Type == 1) echo 'checked'; ?> >
                    定制
                </label>
                <label class="am-radio-inline">
                    <input type="radio"
                           value="2"
                           name="work_value_type"
                        <?php if (isset($workMsg->Type) && $workMsg->Type == 2) echo 'checked'; ?>> 自制
                </label>
            </div>
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel onclick="reset_work_type();">取消</span>
            <span class="am-modal-btn" data-am-modal-confirm onclick="set_work_type();">确定</span>
        </div>
    </div>
</div>
<script type="text/javascript">
    $('#work_value_releasedt').datetimepicker({
        language: 'zh-CN',
        format: 'yyyy-mm-dd hh:ii',
        autoclose: true
    });
    setTimeout('toolbar_ini("work_edit_div", "work_edit_toolbar");', 100);
</script>